﻿@model PlanetTelex.Coverflow.ViewModels.CoverflowViewModel
@{ Script.Require("jQueryUI_Coverflow").AtHead(); }
@{ Style.Require("Coverflow").AtHead(); }

@if (Model.Covers != null && Model.Covers.Count > 0)
{
    <div id="@Model.CoverflowId" class="coverflow">
        @foreach (var cover in Model.Covers)
        {
            <img src="@cover.ImagePath" alt="@cover.Title" data-title="@cover.Title" data-subtitle="@cover.Subtitle" data-category="@cover.Category" />
        }
    </div>
    <script type="text/javascript">
        var $@Model.CoverflowId;
        $(function() {
            $@Model.CoverflowId = $("#@Model.CoverflowId").coverflow(@Model.SettingsJson);
        });
    </script>
}